import { defineConfig } from '@umijs/max';
export default defineConfig({
  antd: {
    // theme: {
    //   '@primary-color': '#1DA57A',
    // },
    // import:true
  },
  access: {},
  model: {},
  initialState: {},
  request: {},
  layout: {
    title: '活动报名',
    locale: false,
  },
  title: '活动报名',
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      path: '/home',
      component: './home',
      name: '首页',
    },
    {
      path: '/editor',
      component: './editor',
      name: '活动细则',
    },
    {
      path: '/*',
      component: './404',
      layout: false,
    },
  ],
  // plugins: ['@umijs/max-plugin-openapi'],
  publicPath: '/',
  base: '/',
  npmClient: 'pnpm',
  proxy: {
    '/back': {
      // target: 'http://web-cc.top',
      target: 'http://localhost:8081',
      changeOrigin: true,
      pathRewrite: (path) => {
        return path.replace('/back', '');
      },
    },
  },
  history: {
    type: 'hash',
  },
  // openAPI: {
  //   requestLibPath: "import { request } from '@umijs/max'",
  //   // 这里使用 copy 的 url
  //   schemaPath: 'http://121.43.173.131/xfj/v2/api-docs',
  //   mock: false,
  // },
});
